package com.github.xiaoymin.map.common.em;

import cn.hutool.core.util.StrUtil;

public enum TencentCoordEnums {

    GPS(1,"GPS坐标"),
    SOGOU(2,"sogou经纬度"),
    BAIDU(3,"baidu经纬度"),
    MAPBAR(4,"mapbar经纬度"),
    DEFAULT(5,"腾讯、google、高德坐标"),
    SOGOU_MERCTOR(6,"sogou墨卡托"),
    ;

    private Integer num;

    private String des;

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    TencentCoordEnums(Integer num, String des) {
        this.num = num;
        this.des = des;
    }

    public static Integer getNum(String index) {
        for (TencentCoordEnums p : TencentCoordEnums.values()) {
            if (StrUtil.equalsIgnoreCase(p.name(),index)) {
                return p.num;
            }
        }
        return null;
    }


}
